/*
 * @(#)JwiPartOfSpeech.java	1.0 08/01/07
 *
 * Copyright 2007 Fabio Gasparetti. All rights reserved.
 */

package org.tabularium.text.nlp.wordnet.jwi;

import edu.mit.jwi.item.PartOfSpeech;

/**
 * 
 * @author Fabio Gasparetti
 * @version 1.0, 08/01/07
 */
public class JwiPartOfSpeech {
	static public PartOfSpeech translate(int pos) {
		switch (pos) {
		case org.tabularium.text.nlp.wordnet.PartOfSpeech.ADJECTIVE:
			return edu.mit.jwi.item.PartOfSpeech.ADJECTIVE;
		case org.tabularium.text.nlp.wordnet.PartOfSpeech.ADVERB:
			return edu.mit.jwi.item.PartOfSpeech.ADVERB;
		case org.tabularium.text.nlp.wordnet.PartOfSpeech.NOUN:
			return edu.mit.jwi.item.PartOfSpeech.NOUN;
		case org.tabularium.text.nlp.wordnet.PartOfSpeech.VERB:
			return edu.mit.jwi.item.PartOfSpeech.VERB;
		default:
			return null;
		}
	}

	static public int translate(PartOfSpeech pos) {
		if (pos == edu.mit.jwi.item.PartOfSpeech.NOUN) {
			return org.tabularium.text.nlp.wordnet.PartOfSpeech.NOUN;
		} else if (pos == edu.mit.jwi.item.PartOfSpeech.ADJECTIVE) {
			return org.tabularium.text.nlp.wordnet.PartOfSpeech.ADJECTIVE;
		} else if (pos == edu.mit.jwi.item.PartOfSpeech.ADVERB) {
			return org.tabularium.text.nlp.wordnet.PartOfSpeech.ADVERB;
		} else if (pos == edu.mit.jwi.item.PartOfSpeech.VERB) {
			return org.tabularium.text.nlp.wordnet.PartOfSpeech.VERB;
		}
		return -1;
	}
}
